# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=py3-bracex
_pkgname=bracex
pkgver=2.5
pkgrel=0
pkgdesc="brace expanding library (à la Bash) for Python"
url="https://facelessuser.github.io/bracex/"
arch="noarch"
license="MIT"
depends="py3-hatchling"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" .dist/*.whl
}

sha512sums="
e738ea7b45b17bbbc9a64e1782653ed69d56a94ef8c83f538d19319ed3ad23ec96037d22af0b00796bf5cb2fca3f75c8c2770ddfa9ef60536fd435de594aaae4  bracex-2.5.tar.gz
"
